/*
 * Copyright (c) 2012 Tyler Treat
 * 
 * This file is part of Infinitum Framework.
 *
 * Infinitum Framework is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Infinitum Framework is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Infinitum Framework.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.clarionmedia.infinitum.rest;

import java.lang.reflect.Field;

import com.clarionmedia.infinitum.context.InfinitumContext;
import com.clarionmedia.infinitum.orm.ObjectMapper;
import com.clarionmedia.infinitum.orm.exception.InvalidMappingException;
import com.clarionmedia.infinitum.orm.exception.ModelConfigurationException;

/**
 * <p>
 * This abstract implementation of {@link ObjectMapper} provides methods to map
 * domain models to RESTful web service resources.
 * </p>
 * 
 * @author Tyler Treat
 * @version 1.0 08/05/12
 * @since 1.0
 */
public abstract class RestfulMapper extends ObjectMapper {

	/**
	 * Creates a new {@code RestfulMapper} with the given
	 * {@link InfinitumContext}.
	 * 
	 * @param context
	 *            the {@code InfinitumContext} to use with this
	 *            {@code RestfulMapper}
	 */
	public RestfulMapper(InfinitumContext context) {
		super(context);
	}

	@Override
	public abstract RestfulModelMap mapModel(Object model)
			throws InvalidMappingException, ModelConfigurationException;

	@Override
	public boolean isTextColumn(Field f) {
		throw new UnsupportedOperationException();
	}

}
